﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="kecheng_delete_gb.aspx.cs" Inherits="SysYcjy_kecheng_delete_gb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">  

    <table>
        <tr>
            <td class="font33">
                <asp:Label ID="Label3" runat="server" Height="24px" Text="选择机构：" Width="86px"></asp:Label>
                <asp:DropDownList ID="dplJigou" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
                    DataTextField="jigou" DataValueField="jigou" Width="173px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="font33">
                <asp:Label ID="Label1" runat="server" Height="24px" Text="选择课程：" Width="86px"></asp:Label>
                <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="sdskechengname"
                    DataTextField="name" DataValueField="id" Width="173px" Height="22px">
                </asp:DropDownList>
            </td>
        </tr>
        <%--<tr>
            <td class="font33">
                <asp:Label ID="Label4" runat="server" Height="24px" Text="查找课程:" Width="86px"></asp:Label>
                <asp:TextBox ID="txtKecheng" runat="server" ToolTip="需要查找的课程名" Width="168px" />
            </td>
        </tr>--%>
        <tr>
            <td class="font33">
                <asp:Label ID="Label5" runat="server" Height="24px" Text="功能按钮:" Width="85px"></asp:Label>
                <%--<asp:Button ID="btnSearch" runat="server" Text="查  找" OnClick="btnSearch_Click" OnClientClick="return checkKecheng();" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="删除课程" Width="90px"
                    OnClientClick="return confirm('确认删除该课程?');" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource1"
                    Width="600px" CssClass="font33">
                    <Fields>
                        <asp:TemplateField HeaderText="学习对象">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("fenlei2") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                &nbsp;
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="name" HeaderText="课程名称" />
                        <asp:BoundField DataField="jigou" HeaderText="机构" />
                        <asp:BoundField DataField="laoshi" HeaderText="任课老师" />
                        <asp:BoundField DataField="confirm" HeaderText="审核标志" />
                        <asp:TemplateField HeaderText="课程简介">
                            <ItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Font-Size="9pt" Height="60px" Text='<%# Bind("jianjie") %>'
                                    TextMode="MultiLine" Width="99%" ReadOnly="True"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="tuijian" HeaderText="推荐" SortExpression="tuijian" />
                        <asp:TemplateField HeaderText="课程类型">
                            <ItemTemplate>
                                <asp:Label ID="Lblkechenglx" runat="server" Text='<%# Eval("kechenglx") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                &nbsp;
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="发布状态">
                            <ItemTemplate>
                                <asp:Label ID="Lblfabuzt" runat="server" Text='<%# Eval("fabuzt") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                &nbsp;
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="学费">
                            <ItemTemplate>
                                <asp:TextBox ID="txtxuefei" runat="server" Font-Size="9pt" Text='<%# Bind("xuefei") %>'
                                    ReadOnly="True"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Fields>
                    <HeaderStyle Width="30px" />
                </asp:DetailsView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT * FROM [kecheng] WHERE ([id] = @id)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList1" Name="id" PropertyName="SelectedValue"
                            Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                <asp:SqlDataSource ID="sdskechengname" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT [id], [name] FROM [kecheng] WHERE ([jigou] = @id )">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="dplJigou" Name="id" PropertyName="SelectedValue"
                            Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT DISTINCT [jigou]FROM [account] WHERE (([role] = @role1) OR ([role] = @role2))">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="机构" Name="role1" Type="String" />
                        <asp:Parameter DefaultValue="管理员" Name="role2" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
